﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TelerikAcademyOopProject
{
    public static class ItemFactory
    {
        public static Item setNewItem(string ItemType)
        {
            if (ItemType == "Stock")
            {
                //return new Stock(itemId,itemNeame, itemPrice, itemCount);
                return new Stock();
            }

            if (ItemType == "Goods")
            {
                //return new Goods(itemId,itemName, itemPrice, itemCount);
                return new Goods();

            }

            if (ItemType == "Currency")
            {
                //return new Currency(itemId,itemName, itemPrice, itemCount);
                return new Currency();
            }

            throw new StockException("No such item Implementation existas in current Stock List");
        }


    }
}
